# -*- coding: utf-8 -*-

#!/usr/bin/python

import sys

from PyQt4 import QtCore, QtGui
from ui.Ui_mainwindow import Ui_MainWindow

class MainWindow(QtGui.QMainWindow):
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        # set signals
        QtCore.QObject.connect(self.ui.btnOpen, QtCore.SIGNAL("clicked()"), self.on_btnOpen_clicked)
        
    def on_btnOpen_clicked(self):
        self.ui.textEdit.setText("Hello world")


if __name__ == '__main__':
    app = QtGui.QApplication(sys.argv)
    myapp = MainWindow()
    myapp.show()
    sys.exit(app.exec_())

